<?php
/**
 * uasort()
 * 1000859843455.8318185297 1000859843455.8318185296 太大,无法使用浮点数比较
 * 使用 SORT_NATURAL 按照自然循序排序
 * 1000859843455 浮点数只能精确到1000859843455.8318
 * 10014<29527 10014<29528, 但因为浮点数失效 所以排序失败
 */
$v = 1000859843455; //13位
$list = [10014=> $v, 29527 => $v, 29528 => $v, 37017=>100];
//$timeList = [10014 => 1681814703, 29527 => 1681814811, 37017 => 1681814811];
$timeList = [10014 => 1681814703, 29527 => 1681814702,29528 => 1681814811, 37017 => 1681814811];
$top = 9999999999;
foreach( $list as $k => &$v ){
    if( empty($timeList[$k]) ){
        $ext = $top;
    }else{
        $ext = $top - $timeList[$k];
    }
    $v = $v .'.'. $ext;
}
var_export(floatval('1000859843455.8318185297'));
var_dump(floatval('1000859843455.8318185297'));
echo "\n";
arsort($list);
var_export($list);
arsort($list, SORT_NATURAL);
arsort($list, SORT_STRING);

var_export($list);